package com.only.common.util.ssh;

import lombok.Data;

/**
 * @author wentao.zou
 * @date 2023/12/07 14:31
 */
@Data
public class UploadFileResult {
    /**
     * 执行是否成功
     */
    private boolean isSuccess;

    /**
     * 错误信息
     */
    private String errMessage = "";

    /**
     * 本地的文件名字
     */
    private String localFileName;

    /**
     * 远程服务器中文件的名字
     */
    private String remoteFileName;

    public UploadFileResult(String errMessage, String localFileName, String remoteFileName) {
        this.isSuccess = false;
        this.localFileName = localFileName;
        this.remoteFileName = remoteFileName;
        this.errMessage = errMessage;
    }

    public UploadFileResult(String localFileName, String remoteFileName) {
        this.isSuccess = true;
        this.localFileName = localFileName;
        this.remoteFileName = remoteFileName;
        this.errMessage = "";
    }
}
